<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<dev id="app">
    <p>{{str}} </p>
    <p v-for="item in array">
        {{item.name}}--{{item.sex}}
    </p>
    <button @click="add">添加</button>
</dev>

</body>
<script src="./dist/js/vue.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            str:"aaa",

            array:[
                {
                    "name":"周俊",
                    "sex":"男"
                },
                {
                    "name":"李四",
                    "sex":"男"
                }
            ]
        },
        mounted() {
            //加载页面初始化表单
            this.loadData();

        },
        methods: {
            loadData() {
            },
            add(){
                vm.array.push({
                    "name":"哈哈",
                    "sex":"女"
                });
            }
        }
    })
</script>

</html>